package com.diboot.core.methods;

public enum RecycleBinSqlMethod {
    DELETE_BATCH_BY_IDS("deleteBatchIdsInRecycleBin", "根据ID集合，批量删除数据", "<script>\nDELETE FROM %s WHERE %s IN (%s) %s\n</script>"),
    UPDATE("updateInRecycleBin", "根据 whereEntity 条件，更新记录", "<script>\nUPDATE %s %s %s %s\n</script>"),
    DELETE("deleteInRecycleBin", "根据 entity 条件删除记录", "<script>\nDELETE FROM %s %s %s\n</script>"),
    SELECT_BY_ID("selectByIdInRecycleBin", "根据ID 查询一条数据", "SELECT %s FROM %s WHERE %s=#{%s} %s"),
    SELECT_PAGE_IN_RECYCLE_BIN("selectPageInRecycleBin", "查询满足条件所有数据（并翻页）", "<script>%s SELECT %s FROM %s %s %s %s\n</script>");

    private final String method;
    private final String desc;
    private final String sql;

    private RecycleBinSqlMethod(String method, String desc, String sql) {
        this.method = method;
        this.desc = desc;
        this.sql = sql;
    }

    public String getMethod() {
        return this.method;
    }

    public String getDesc() {
        return this.desc;
    }

    public String getSql() {
        return this.sql;
    }
}
